import request from '@/utils/request'

function page(data) {
  return request({
    url: '/sapi/app/product/page',
    method: 'post',
    data: data
  })
}

function detail(data) {
  return request({
    url: '/sapi/app/product/detail',
    method: 'post',
    data: data
  })
}

function add(data) {
  return request({
    url: '/sapi/app/product/add',
    method: 'post',
    data: data
  })
}

function edit(data) {
  return request({
    url: '/sapi/app/product/edit',
    method: 'post',
    data: data
  })
}

function remove(data) {
  return request({
    url: '/sapi/app/product/remove',
    method: 'post',
    data: data
  })
}

function onSale(data) {
  return request({
    url: '/sapi/app/product/onSale',
    method: 'post',
    data: data
  })
}

function offSale(data) {
  return request({
    url: '/sapi/app/product/offSale',
    method: 'post',
    data: data
  })
}

function statistics(data) {
  return request({
    url: '/sapi/app/product/statistics',
    method: 'post',
    data: data
  })
}

function reward(data) {
  return request({
    url: '/sapi/app/product/reward',
    method: 'post',
    data: data
  })
}

function win(data) {
  return request({
    url: '/sapi/app/product/win',
    method: 'post',
    data: data
  })
}

function lost(data) {
  return request({
    url: '/sapi/app/product/lost',
    method: 'post',
    data: data
  })
}

function getSports(data) {
  return request({
    url: '/sapi/app/product/getSports',
    method: 'post',
    data: data
  })
}

function periods(data) {
  return request({
    url: '/sapi/app/product/periods',
    method: 'post',
    data: data
  })
}
function productCompare(data) {
  return request({
    url: '/sapi/app/product/productCompare',
    method: 'post',
    data: data
  })
}
export default {
  page,
  detail,
  add,
  edit,
  remove,
  onSale,
  offSale,
  reward,
  statistics,
  win,
  lost,
  getSports,
  periods,
  productCompare
}
